package welsir.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import welsir.entity.dos.Tag;
import welsir.entity.vo.ResultMessage;
import welsir.service.ITagService;
import welsir.util.ResultUtil;

import java.util.List;

/**
 * @author Genius
 * @date 2023/03/07 17:32
 **/
@RestController
@RequestMapping("/Tag")
@Api(value = "标签Controller")
public class TagController {

    @Autowired
    ITagService tagService;

    @ApiOperation(value = "获取所有tag")
    @GetMapping("/getAllTag")
    public ResultMessage<List<Tag>> getAllTag(){
        return ResultUtil.data(tagService.getAllTage());
    }
}
